﻿using System.ServiceProcess;
using System.Reflection;
using System.IO;
using log4net.Config;

namespace Jsptpd.JobScheduler
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        static void Main()
        {
            string assemblyFilePath = Assembly.GetExecutingAssembly().Location;
            string assemblyDirPath = Path.GetDirectoryName(assemblyFilePath);
            string configFilePath = assemblyDirPath + "\\..\\..\\log4net.config";
            XmlConfigurator.ConfigureAndWatch(new FileInfo(configFilePath));           

            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[] 
			{ 
				new jsptpdJobScheduler(),                
			};
            ServiceBase.Run(ServicesToRun);
        }
    }
}
